from django.db import models


class Stock(models.Model):
    product = models.ForeignKey("Product", related_name="product_stock", on_delete=models.CASCADE)
    num_in_stock = models.PositiveIntegerField(help_text="库存数量", default=0)
    num_allocated = models.PositiveIntegerField(help_text="分配数量", default=0)
    price = models.IntegerField(help_text="单价", default=0)
